class Person(object):
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def __call__(self, *args, **kwargs):
        print('被调用了')

    def __add__(self, other):
        return self.age + other.age

    def __ge__(self, value):
        return self.age >= value

    def __del__(self):

        print('被删除了')

class Dog():
    def __init__(self, name, age):
        self.name = name
        self.age = age


p1 = Person('lisi', 18)
p2 = Person('zs', 19)  # 就算你不主动删除,  在脚本执行完成时,  解释器也会把p2 删除

# d1 = Dog('xiaohua', 3)

# print(p1 + d1)
# print(d1 + p1)
# print(p1 >= 20)
# l1 = [1, 2, 3]
# l2 = [4, 5, 6]
# print(l1 + l2)  # __add__()
# p1()

del p1
del p2